basic functions of array manipulationThe key name and value of the arrayArray_values ($arr); Gets the value of the array Array_keys ($arr), gets the key name of the array array_flip ($arr), and the values in the array are exchanged with the key
Basic functions of array manipulationThe key name and value of the arrayArray_values ($arr); Get the value of an arrayArray_keys ($arr); Gets the key name of the arrayArray_flip ($arr); the values in the array are exchanged with the key names (if
Php basic knowledge Summary (1) array, basic knowledge array
I. Sorting1. asort-Positive Sorting to maintain the index relationship2. arsort-reverse sorting to maintain the index relationship3. sort -- sorting from the lowest to the highest4. ksort -
Organized the Array of very basic to grasp the knowledge points, hope to help beginners, but also hope that their future more use more mastery.Create an array
Use the array constructor:
var a=New Array (); // create an empty array var
Some php array learning notes. There are three types of php arrays: a numeric array with a numeric ID key, and an ID key in an array associated with a value multi-dimensional array containing one or more arrays, there are three types of php arrays:
Php array function Learning Record 2 1. check whether the given key name or index exists in the array -- array_key_exists
Usage: array_key_exists ($ key (mixed), $ input (array) returns TRUE and FALSE
$input_array=array("1"=>"java","op"=>"R","act"
An array is a variable that can store a group or a series of values. * Arrays are a basic data type. Array functions can also implement data structures such as stacks and queues. Subscript: the identifier of an array, that is, the code of a string
Subscript: The identifying name in the array is the code of the string or integer in the array
Several index values in an array are referred to as several-dimensional arrays.
Index value: An index is a structure that sorts the values of one or more
In java, the index of an array must be a number, and the number of arrays must be determined when the array is declared. Php is more flexible. indexes can make numbers or strings, and the number of arrays can be changed at will.
Objective: to
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.